Correctly Rounded Binary-Decimal and Decimal-Binary Conversions

نویسنده

  • David M. Gay
چکیده

This note discusses the main issues in performing correctly rounded decimal-to-binary and binary-to-decimal conversions. It reviews recent work by Clinger and by Steele and White on these conversions and describes some efficiency enhancements. Computational experience with several kinds of arithmetic suggests that the average computational cost for correct rounding can be small for typical conversions. Source for conversion routines that support this claim is available from netlib.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Computer Arithmetic Conversions between Binary and Decimal Systems

We will first see how to convert a real number in binary form into its decimal equivalent. The key idea is that the binary digits to the left of the binary decimal point increase in factors of 2 for each place moved over. Similarly, the digits to the right of the binary decimal point decrease in factors of 2 for each place moved over. Consider the real number (101.1)2 in binary form. We have (1...

متن کامل

On Intermediate Precision Required for Correctly-Rounding Decimal-to-Binary Floating-Point Conversion

The algorithms developed ten years ago in preparation for IBM’s support of IEEE Floating-Point on its mainframe S/390 processors use an overly conservative intermediate precision to guarantee correctly-rounded results across the entire exponent range. Here we study the minimal requirement for both bounded and unbounded precision on the decimal side (converting to machine precision on the binary...

متن کامل

Easy Accurate Reading and Writing of Floating-Point Numbers

Presented here are algorithms for converting between (decimal) scientific-notation and (binary) IEEE-754 double-precision floating-point numbers. These algorithms are much simpler than those previously published. The values are stable under repeated conversions between the formats. The scientific representations generated have only the minimum number of mantissa digits needed to convert back to...

متن کامل

Design Exploration for Decimal Floating-Point Arithmetic

Commercial applications and databases typically store numerical data in decimal format. Currently, however, microprocessors do not provide instructions or hardware support for decimal floating-point arithmetic [ 1 ]. Consequently, decimal numbers are often read into computers, converted to binary numbers, and then processed using binary floating-point arithmetic. Results are then converted back...

متن کامل

Solutions to the practice problems

Problem P01: Compute the first N decimal digits after the decimal point of sin(sin(sin 1)), rounded toward zero. We have sin(sin(sin 1)) ≈ 0.678: the first N decimal digits after the decimal point match the first N mantissa digits. We use a target decimal precision N1 > N , and a binary precision p. We compute x = ◦(sin 1), y = ◦(sinx), z = ◦(sin y), with all roundings to nearest. It is easy to...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1990